<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>CentOS7 安装FastDFS+nginx | Joey</title><meta name="keywords" content="Linux,CentOS,FastDFS,nginx"><meta name="author" content="方陈勇"><meta name="copyright" content="方陈勇"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="CentOS7 安装FastDFS+nginx">
<meta property="og:type" content="article">
<meta property="og:title" content="CentOS7 安装FastDFS+nginx">
<meta property="og:url" content="https://fangchenyong.top/2019/08/14/Linux-install_FastDFS+Nginx/index.html">
<meta property="og:site_name" content="Joey">
<meta property="og:description" content="CentOS7 安装FastDFS+nginx">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG">
<meta property="article:published_time" content="2019-08-13T16:00:00.000Z">
<meta property="article:modified_time" content="2020-05-22T09:57:26.334Z">
<meta property="article:author" content="方陈勇">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="CentOS">
<meta property="article:tag" content="FastDFS">
<meta property="article:tag" content="nginx">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://fangchenyong.top/2019/08/14/Linux-install_FastDFS+Nginx/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2020-05-22 17:57:26'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/3FD9B055-6361-49B7-B8CE-5BA9144BD27F.JPG" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">43</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">51</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">53</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Link</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/img/20190723151525.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Joey</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Link</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">CentOS7 安装FastDFS+nginx</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2019-08-13T16:00:00.000Z" title="发表于 2019-08-14 00:00:00">2019-08-14</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2020-05-22T09:57:26.334Z" title="更新于 2020-05-22 17:57:26">2020-05-22</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Linux/">Linux</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Linux/CentOS/">CentOS</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Linux/CentOS/FastDFS/">FastDFS</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Linux/CentOS/FastDFS/nginx/">nginx</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.8k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>10分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="CentOS7-安装FastDFS-nginx"><a href="#CentOS7-安装FastDFS-nginx" class="headerlink" title="CentOS7 安装FastDFS+nginx"></a>CentOS7 安装FastDFS+nginx</h2><h4 id="1-先查看有没有安装gcc，FastDFS是C语言开发，编译依赖gcc环境"><a href="#1-先查看有没有安装gcc，FastDFS是C语言开发，编译依赖gcc环境" class="headerlink" title="1.  先查看有没有安装gcc，FastDFS是C语言开发，编译依赖gcc环境"></a>1.  先查看有没有安装gcc，FastDFS是C语言开发，编译依赖gcc环境</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">[root@localhost ~]# gcc -v</span><br><span class="line">bash: gcc: 未找到命令...</span><br><span class="line"><span class="meta">#</span><span class="bash">安装gcc、libevent、perl</span></span><br><span class="line">[root@root ~]# yum install gcc-c++</span><br><span class="line">[root@root ~]# yum -y install libevent</span><br><span class="line">[root@root ~]# yum install perl</span><br></pre></td></tr></table></figure>

<h4 id="2-解压libfastcommon"><a href="#2-解压libfastcommon" class="headerlink" title="2.  解压libfastcommon"></a>2.  解压libfastcommon</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">[root@root opt]# cd fastDFS/</span><br><span class="line">[root@root fastDFS]# ls</span><br><span class="line">fastdfs-nginx-module_v1.16.tar.gz  FastDFS_v5.05.tar.gz  libfastcommonV1.0.7.tar.gz</span><br><span class="line"><span class="meta">#</span><span class="bash">解压libfastcommon</span></span><br><span class="line">[root@root fastDFS]# tar -zxvf libfastcommonV1.0.7.tar.gz </span><br><span class="line">[root@root fastDFS]# cd libfastcommon-1.0.7/</span><br><span class="line">[root@root libfastcommon-1.0.7]# ls</span><br><span class="line">HISTORY  INSTALL  libfastcommon.spec  make.sh  README  src</span><br><span class="line"><span class="meta">#</span><span class="bash">编译</span></span><br><span class="line">[root@root libfastcommon-1.0.7]# ./make.sh </span><br><span class="line"><span class="meta">#</span><span class="bash">安装</span></span><br><span class="line">[root@root libfastcommon-1.0.7]# ./make.sh install</span><br><span class="line">mkdir -p /usr/lib64</span><br><span class="line">install -m 755 libfastcommon.so /usr/lib64</span><br><span class="line">mkdir -p /usr/include/fastcommon</span><br><span class="line">install -m 644 common_define.h hash.h chain.h logger.h base64.h shared_func.h pthread_func.h ini_file_reader.h _os_bits.h sockopt.h sched_thread.h http_func.h md5.h local_ip_func.h avl_tree.h ioevent.h ioevent_loop.h fast_task_queue.h fast_timer.h process_ctrl.h fast_mblock.h connection_pool.h /usr/include/fastcommon</span><br><span class="line">[root@root lib64]# cd /usr/lib64</span><br><span class="line">[root@root lib64]# ls libfastcommon.*</span><br><span class="line">libfastcommon.so</span><br><span class="line"><span class="meta">#</span><span class="bash">拷贝到32位环境中</span></span><br><span class="line">[root@root lib64]# cp libfastcommon.so /usr/lib</span><br><span class="line">[root@root lib64]# cd /usr/lib</span><br><span class="line">[root@root lib]# ls libfastcommon.*</span><br><span class="line">libfastcommon.so</span><br></pre></td></tr></table></figure>

<h4 id="3-安装FastDFS"><a href="#3-安装FastDFS" class="headerlink" title="3.安装FastDFS"></a>3.安装FastDFS</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">解压</span></span><br><span class="line">[root@root fastDFS]# tar -zxvf FastDFS_v5.05.tar.gz </span><br><span class="line">[root@root fastDFS]# cd FastDFS/</span><br><span class="line">[root@root FastDFS]# ls</span><br><span class="line">client  conf             fastdfs.spec  init.d   make.sh     README.md   stop.sh  test</span><br><span class="line">common  COPYING-3_0.txt  HISTORY       INSTALL  php_client  restart.sh  storage  tracker</span><br><span class="line"><span class="meta">#</span><span class="bash">编译</span></span><br><span class="line">[root@root FastDFS]# ./make.sh </span><br><span class="line"><span class="meta">#</span><span class="bash">安装</span></span><br><span class="line">[root@root FastDFS]# ./make.sh install</span><br></pre></td></tr></table></figure>

<h4 id="4-配置tracker节点"><a href="#4-配置tracker节点" class="headerlink" title="4.  配置tracker节点"></a>4.  配置tracker节点</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">[root@root FastDFS]# cd conf/</span><br><span class="line">[root@root conf]# ls</span><br><span class="line">anti-steal.jpg  client.conf  http.conf  mime.types  storage.conf  storage_ids.conf  tracker.conf</span><br><span class="line"><span class="meta">#</span><span class="bash">拷贝所有配置文件到 /etc/fdfs目录下</span></span><br><span class="line">[root@root conf]# cp * /etc/fdfs/</span><br><span class="line">[root@root conf]# cd /etc/fdfs/</span><br><span class="line">[root@root fdfs]# ls</span><br><span class="line">anti-steal.jpg  client.conf.sample  mime.types    storage.conf.sample  tracker.conf</span><br><span class="line">client.conf     http.conf           storage.conf  storage_ids.conf     tracker.conf.sample</span><br><span class="line"><span class="meta">#</span><span class="bash">修改tracker配置文件修改存储和日志路径</span></span><br><span class="line">[root@root fdfs]# vim tracker.conf</span><br><span class="line"><span class="meta">#</span><span class="bash"> the base path to store data and <span class="built_in">log</span> files</span></span><br><span class="line">base_path=/fastdfs/tracker</span><br><span class="line"><span class="meta">#</span><span class="bash">创建存储路径，顺带创建storage和client存储路径</span></span><br><span class="line">[root@root /]# mkdir /fastdfs/tracker -p</span><br><span class="line">[root@root fastdfs]# mkdir storage</span><br><span class="line">[root@root fastdfs]# mkdir client</span><br><span class="line"><span class="meta">#</span><span class="bash">进入usr/bin文件夹，以/etc/fdfs/tracker.conf配置文件启动tracker</span></span><br><span class="line">[root@root bin]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start</span><br><span class="line"><span class="meta">#</span><span class="bash">重启</span></span><br><span class="line">[root@root bin]# /usr/bin/fdfs_trackerd fdfs_trackerd /etc/fdfs/tracker.conf restart</span><br></pre></td></tr></table></figure>

<h4 id="5-配置storage节点"><a href="#5-配置storage节点" class="headerlink" title="5. 配置storage节点"></a>5. 配置storage节点</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">[root@root bin]# cd /etc/fdfs/</span><br><span class="line"><span class="meta">#</span><span class="bash">编辑storage配置文件，修改以下配置</span></span><br><span class="line">[root@root fdfs]# vim storage.conf</span><br><span class="line">group_name=joey   #组名，可根据实际情况修改，</span><br><span class="line">base_path=/fastdfs/storage #设置storage数据文件和日志目录，需预先创建</span><br><span class="line">store_path0=/fastdfs/storage #存储路径</span><br><span class="line">tracker_server=192.168.116.145:22122 # #tracker 服务器的 IP地址和端口号，如果是单机搭建，IP不要写127.0.0.1，否则启动不成功。</span><br><span class="line"><span class="meta">#</span><span class="bash">启动storage</span></span><br><span class="line">[root@root bin]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf</span><br><span class="line"><span class="meta">#</span><span class="bash">重启storage</span></span><br><span class="line">[root@root bin]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart</span><br></pre></td></tr></table></figure>

<h4 id="6-配置client"><a href="#6-配置client" class="headerlink" title="6. 配置client"></a>6. 配置client</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">编辑client，修改存储路径和tracker_server为本机IP</span></span><br><span class="line">[root@root fdfs]# vim client.conf</span><br><span class="line"><span class="meta">#</span><span class="bash"> the base path to store <span class="built_in">log</span> files</span></span><br><span class="line">base_path=/fastdfs/client</span><br><span class="line"><span class="meta">#</span><span class="bash"> tracker_server can ocur more than once, and tracker_server format is</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  <span class="string">&quot;host:port&quot;</span>, host can be hostname or ip address</span></span><br><span class="line">tracker_server=192.168.1.20:22122</span><br></pre></td></tr></table></figure>

<h4 id="7-测试"><a href="#7-测试" class="headerlink" title="7. 测试"></a>7. 测试</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">[root@root home]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/guanli.png </span><br><span class="line">This is FastDFS client test program v5.05</span><br><span class="line"></span><br><span class="line">Copyright (C) 2008, Happy Fish / YuQing</span><br><span class="line"></span><br><span class="line">FastDFS may be copied only under the terms of the GNU General</span><br><span class="line">Public License V3, which may be found in the FastDFS source kit.</span><br><span class="line">Please visit the FastDFS Home Page http://www.csource.org/ </span><br><span class="line">for more detail.</span><br><span class="line"></span><br><span class="line">[2019-08-14 15:55:42] DEBUG - base_path=/fastdfs/client, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0</span><br><span class="line"></span><br><span class="line">tracker_query_storage_store_list_without_group: </span><br><span class="line">	server 1. group_name=, ip_addr=192.168.1.20, port=23000</span><br><span class="line"></span><br><span class="line">group_name=joey, ip_addr=192.168.1.20, port=23000</span><br><span class="line">storage_upload_by_filename</span><br><span class="line">group_name=joey, remote_filename=M00/00/00/wKgBFF1Tvn6AL_ulAAhuqKakO_M091.png</span><br><span class="line">source ip address: 192.168.1.20</span><br><span class="line">file timestamp=2019-08-14 15:55:42</span><br><span class="line">file size=552616</span><br><span class="line">file crc32=2795781107</span><br><span class="line">example file url: http://192.168.1.20/joey/M00/00/00/wKgBFF1Tvn6AL_ulAAhuqKakO_M091.png</span><br><span class="line">storage_upload_slave_by_filename</span><br><span class="line">group_name=joey, remote_filename=M00/00/00/wKgBFF1Tvn6AL_ulAAhuqKakO_M091_big.png</span><br><span class="line">source ip address: 192.168.1.20</span><br><span class="line">file timestamp=2019-08-14 15:55:42</span><br><span class="line">file size=552616</span><br><span class="line">file crc32=2795781107</span><br><span class="line">example file url: http://192.168.1.20/joey/M00/00/00/wKgBFF1Tvn6AL_ulAAhuqKakO_M091_big.png</span><br><span class="line"><span class="meta">#</span><span class="bash">返回链接就是成功了，但是还是访问不了，需要安装nginx服务器</span></span><br></pre></td></tr></table></figure>

<h4 id="8-安装nginx"><a href="#8-安装nginx" class="headerlink" title="8.  安装nginx"></a>8.  安装nginx</h4><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">解压安装fastdfs-nginx-module</span></span><br><span class="line">[root@root fastDFS]# tar -zxvf fastdfs-nginx-module_v1.16.tar.gz </span><br><span class="line"><span class="meta">#</span><span class="bash"> 编辑 Nginx 模块的配置文件</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 复制配置文件至/etc/fdfs/，编辑config文件删除路径中的<span class="built_in">local</span></span></span><br><span class="line">[root@root src]# cp * /etc/fdfs/</span><br><span class="line">[root@root src]# vim /fastdfs-nginx-module/src/config</span><br><span class="line">ngx_addon_name=ngx_http_fastdfs_module</span><br><span class="line">HTTP_MODULES=&quot;$HTTP_MODULES ngx_http_fastdfs_module&quot;</span><br><span class="line">NGX_ADDON_SRCS=&quot;$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fastdfs_module.c&quot;</span><br><span class="line">CORE_INCS=&quot;$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/&quot;</span><br><span class="line">CORE_LIBS=&quot;$CORE_LIBS -L/usr/lib -lfastcommon -lfdfsclient&quot;</span><br><span class="line">CFLAGS=&quot;$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE=&#x27;256*1024&#x27; -DFDFS_MOD_CONF_FILENAME=&#x27;\&quot;/etc/fdfs/mod_fastdfs.conf\&quot;&#x27;&quot;</span><br><span class="line"><span class="meta">#</span><span class="bash">安装nginx依赖</span></span><br><span class="line">[root@root fastDFS]# yum install -y pcre pcre-devel</span><br><span class="line">[root@root fastDFS]# yum install -y zlib zlib-devel</span><br><span class="line">[root@root fastDFS]# yum install -y openssl openssl-devel</span><br><span class="line"><span class="meta">#</span><span class="bash"> 解压nginx wget http://nginx.org/download/nginx-1.8.0.tar.gz</span></span><br><span class="line">[root@root fastDFS]# tar -zxvf nginx-1.8.0.tar.gz </span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">nginx配置记得修改最后的module路径</span></span><br><span class="line"><span class="meta">#</span><span class="bash">复制粘贴在nginx目录下执行</span></span><br><span class="line">[root@root nginx-1.8.0]# ./configure \</span><br><span class="line"><span class="meta">&gt;</span><span class="bash"> --prefix=/usr/<span class="built_in">local</span>/nginx \</span></span><br><span class="line"><span class="bash">&gt; --pid-path=/var/<span class="built_in">local</span>/nginx/nginx.pid \</span></span><br><span class="line"><span class="bash">&gt; --lock-path=/var/lock/nginx/nginx.lock \</span></span><br><span class="line"><span class="bash">&gt; --error-log-path=/var/<span class="built_in">log</span>/nginx/error.log \</span></span><br><span class="line"><span class="bash">&gt; --http-log-path=/var/<span class="built_in">log</span>/nginx/access.log \</span></span><br><span class="line"><span class="bash">&gt; --with-http_gzip_static_module \</span></span><br><span class="line"><span class="bash">&gt; --http-client-body-temp-path=/var/temp/nginx/client \</span></span><br><span class="line"><span class="bash">&gt; --http-proxy-temp-path=/var/temp/nginx/proxy \</span></span><br><span class="line"><span class="bash">&gt; --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \</span></span><br><span class="line"><span class="bash">&gt; --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \</span></span><br><span class="line"><span class="bash">&gt; --http-scgi-temp-path=/var/temp/nginx/scgi \</span></span><br><span class="line"><span class="bash">&gt; --add-module=/opt/fastDFS/fastdfs-nginx-module/src</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">编译</span></span><br><span class="line">[root@root nginx-1.8.0]# make</span><br><span class="line"><span class="meta">#</span><span class="bash">安装</span></span><br><span class="line">[root@root nginx-1.8.0]# make install</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">查看安装文件</span></span><br><span class="line">[root@root nginx-1.8.0]# cd /usr/local/</span><br><span class="line">[root@root local]# ls</span><br><span class="line">bin  etc  games  include  lib  lib64  libexec  nginx  sbin  share  src</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">复制粘贴配置文件</span></span><br><span class="line">[root@root local]# cd /opt/fastDFS/fastdfs-nginx-module/src/</span><br><span class="line">[root@root src]# ls</span><br><span class="line">common.c  common.h  config  mod_fastdfs.conf  ngx_http_fastdfs_module.c</span><br><span class="line">[root@root src]# cp mod_fastdfs.conf /etc/fdfs/</span><br><span class="line">[root@root src]# vim /etc/fdfs/mod_fastdfs.conf</span><br><span class="line"><span class="meta">#</span><span class="bash">修改日志存储路径</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> the base path to store <span class="built_in">log</span> files</span></span><br><span class="line">base_path=/fastdfs/tmp</span><br><span class="line"><span class="meta">#</span><span class="bash">修改tracker路径</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> FastDFS tracker_server can ocur more than once, and tracker_server format is</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  <span class="string">&quot;host:port&quot;</span>, host can be hostname or ip address</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> valid only when load_fdfs_parameters_from_tracker is <span class="literal">true</span></span></span><br><span class="line">tracker_server=192.168.1.20:22122</span><br><span class="line"><span class="meta">#</span><span class="bash"> the group name of the <span class="built_in">local</span> storage server</span></span><br><span class="line">group_name=joey</span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="keyword">if</span> the url / uri including the group name</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">set</span> to <span class="literal">false</span> when uri like /M00/00/00/xxx</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">set</span> to <span class="literal">true</span> when uri like <span class="variable">$&#123;group_name&#125;</span>/M00/00/00/xxx, such as group1/M00/xxx</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> default value is <span class="literal">false</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> store_path<span class="comment">#, based 0, if store_path0 not exists, it&#x27;s value is base_path</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> the paths must be exist</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> must same as storage.conf</span></span><br><span class="line">store_path0=/fastdfs/storage</span><br><span class="line"><span class="meta">#</span><span class="bash">store_path1=/home/yuqing/fastdfs1</span></span><br><span class="line"><span class="meta">#</span><span class="bash">编辑配置文件添加下面这段，注意nginx使用的配置文件是哪个，/usr/<span class="built_in">local</span>/nginx/conf/nginx.conf</span></span><br><span class="line">[root@root conf]# vim nginx.conf</span><br><span class="line">        server &#123;</span><br><span class="line">            listen       88;</span><br><span class="line">            server_name  192.168.1.20 ;</span><br><span class="line"></span><br><span class="line">            location / &#123;</span><br><span class="line">                nginx_fastdfs_module;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"><span class="meta">#</span><span class="bash">检查</span></span><br><span class="line">[root@root conf]cd /usr/local/nginx/sbin/</span><br><span class="line">[root@root sbin]# ./nginx -t</span><br><span class="line">ngx_http_fastdfs_set pid=33746</span><br><span class="line">nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok</span><br><span class="line">nginx: [emerg] mkdir() &quot;/var/temp/nginx/client&quot; failed (2: No such file or directory)</span><br><span class="line">nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed</span><br><span class="line"><span class="meta">#</span><span class="bash">[emerg] mkdir() <span class="string">&quot;/var/temp/nginx/client&quot;</span> failed (2: No such file or directory)</span></span><br><span class="line"><span class="meta">#</span><span class="bash">报错显示没有目录/var/temp/nginx/client</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">去创建目录</span></span><br><span class="line">[root@root sbin]# mkdir /var/temp/nginx -p</span><br><span class="line"><span class="meta">#</span><span class="bash">再次检查</span></span><br><span class="line">[root@root sbin]# ./nginx -t</span><br><span class="line">ngx_http_fastdfs_set pid=33766</span><br><span class="line">nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok</span><br><span class="line">nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">检查失败，访问失败，去查看防火墙状态：active (running)</span></span><br><span class="line">[root@root sbin]# sudo systemctl status firewalld</span><br><span class="line">● firewalld.service - firewalld - dynamic firewall daemon</span><br><span class="line">   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)</span><br><span class="line">   Active: active (running) since 三 2019-08-14 11:34:40 CST; 5h 51min ago</span><br><span class="line">     Docs: man:firewalld(1)</span><br><span class="line"> Main PID: 771 (firewalld)</span><br><span class="line">    Tasks: 2</span><br><span class="line">   CGroup: /system.slice/firewalld.service</span><br><span class="line">           └─771 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid</span><br><span class="line"></span><br><span class="line">8月 14 11:34:38 root systemd[1]: Starting firewalld - dynamic firewall daemon...</span><br><span class="line">8月 14 11:34:40 root systemd[1]: Started firewalld - dynamic firewall daemon.</span><br><span class="line"><span class="meta">#</span><span class="bash">暂时关闭防火墙，下次重启会失效或者<span class="built_in">disable</span>掉</span></span><br><span class="line">[root@root sbin]# sudo systemctl stop firewalld</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/img/20190814172907.png" alt="访问nginx成功"></p>
<p><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/img/20190814173428.png" alt="访问图片失败"></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">修改配置</span></span><br><span class="line">[root@root fdfs]# vim mod_fastdfs.conf </span><br><span class="line"><span class="meta">#</span><span class="bash"> store_path<span class="comment">#, based 0, if store_path0 not exists, it&#x27;s value is base_path</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> the paths must be exist</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> must same as storage.conf</span></span><br><span class="line">store_path0=/fastdfs/storage</span><br><span class="line"><span class="meta">#</span><span class="bash">store_path1=/home/yuqing/fastdfs1</span></span><br><span class="line"><span class="meta">#</span><span class="bash">重启所有服务</span></span><br><span class="line">[root@root fdfs]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart</span><br><span class="line">waiting for pid [28338] exit ...</span><br><span class="line">starting ...</span><br><span class="line">[root@root fdfs]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart</span><br><span class="line">waiting for pid [28841] exit ...</span><br><span class="line">starting ...</span><br><span class="line">[root@root fdfs]# cd /usr/local/nginx/sbin/</span><br><span class="line">[root@root sbin]# ./nginx -s reload</span><br><span class="line">ngx_http_fastdfs_set pid=34197</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/img/20190814174007.png" alt="图片访问成功"></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">方陈勇</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://fangchenyong.top/2019/08/14/Linux-install_FastDFS+Nginx/">https://fangchenyong.top/2019/08/14/Linux-install_FastDFS+Nginx/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://fangchenyong.top" target="_blank">Joey</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Linux/">Linux</a><a class="post-meta__tags" href="/tags/CentOS/">CentOS</a><a class="post-meta__tags" href="/tags/FastDFS/">FastDFS</a><a class="post-meta__tags" href="/tags/nginx/">nginx</a></div><div class="post_share"><div class="social-share" data-image="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2019/08/23/Java-%E6%BA%90%E7%A0%81-JDK8-Object/"><img class="prev-cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">JDK8 Object源码</div></div></a></div><div class="next-post pull-right"><a href="/2019/07/29/%E9%A1%B9%E7%9B%AE-%E7%90%86%E8%B4%A2%E4%BA%A7%E5%93%81%E7%B3%BB%E7%BB%9F/"><img class="next-cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">理财产品系统（慕课网）</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2019/07/23/Linux-install_ActiveMQ/" title="CentOS 7.2安装ActiveMQ 5.14.5"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">CentOS 7.2安装ActiveMQ 5.14.5</div></div></a></div><div><a href="/2019/07/23/Linux-install_JDK1.8/" title="Centos7.2下安装JDK三种方法"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">Centos7.2下安装JDK三种方法</div></div></a></div><div><a href="/2019/07/23/Linux-install_MongoDB4.0.5/" title="CentOS 7.2安装MongoDB 4.0.5"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">CentOS 7.2安装MongoDB 4.0.5</div></div></a></div><div><a href="/2019/07/23/Linux-install_MySql5.7/" title="CentOS 7.2 安装MySql 5.7"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">CentOS 7.2 安装MySql 5.7</div></div></a></div><div><a href="/2019/07/23/Linux-install_Redis5.0.3/" title="Centos 7.2 安装目前最新版Redis5.0.3"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">Centos 7.2 安装目前最新版Redis5.0.3</div></div></a></div><div><a href="/2019/07/23/Linux-install_Redis5.0.3_cluster/" title="CentOS 7.2安装Redis 5.0.3集群"><img class="cover" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-07-23</div><div class="title">CentOS 7.2安装Redis 5.0.3集群</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/3FD9B055-6361-49B7-B8CE-5BA9144BD27F.JPG" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">方陈勇</div><div class="author-info__description">一路向前</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">43</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">51</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">53</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/fangchenyong"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/fangchenyong" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:1013659102@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">个人笔记，如有疑问请联系 QQ:1013659102。</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#CentOS7-%E5%AE%89%E8%A3%85FastDFS-nginx"><span class="toc-number">1.</span> <span class="toc-text">CentOS7 安装FastDFS+nginx</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E5%85%88%E6%9F%A5%E7%9C%8B%E6%9C%89%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85gcc%EF%BC%8CFastDFS%E6%98%AFC%E8%AF%AD%E8%A8%80%E5%BC%80%E5%8F%91%EF%BC%8C%E7%BC%96%E8%AF%91%E4%BE%9D%E8%B5%96gcc%E7%8E%AF%E5%A2%83"><span class="toc-number">1.0.1.</span> <span class="toc-text">1.  先查看有没有安装gcc，FastDFS是C语言开发，编译依赖gcc环境</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-%E8%A7%A3%E5%8E%8Blibfastcommon"><span class="toc-number">1.0.2.</span> <span class="toc-text">2.  解压libfastcommon</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-%E5%AE%89%E8%A3%85FastDFS"><span class="toc-number">1.0.3.</span> <span class="toc-text">3.安装FastDFS</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-%E9%85%8D%E7%BD%AEtracker%E8%8A%82%E7%82%B9"><span class="toc-number">1.0.4.</span> <span class="toc-text">4.  配置tracker节点</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#5-%E9%85%8D%E7%BD%AEstorage%E8%8A%82%E7%82%B9"><span class="toc-number">1.0.5.</span> <span class="toc-text">5. 配置storage节点</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#6-%E9%85%8D%E7%BD%AEclient"><span class="toc-number">1.0.6.</span> <span class="toc-text">6. 配置client</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-%E6%B5%8B%E8%AF%95"><span class="toc-number">1.0.7.</span> <span class="toc-text">7. 测试</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#8-%E5%AE%89%E8%A3%85nginx"><span class="toc-number">1.0.8.</span> <span class="toc-text">8.  安装nginx</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/05/06/%E7%AE%97%E6%B3%95-%E6%8F%92%E5%85%A5%E6%8E%92%E5%BA%8F/" title="算法"><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="算法"/></a><div class="content"><a class="title" href="/2021/05/06/%E7%AE%97%E6%B3%95-%E6%8F%92%E5%85%A5%E6%8E%92%E5%BA%8F/" title="算法">算法</a><time datetime="2021-05-05T16:00:00.000Z" title="发表于 2021-05-06 00:00:00">2021-05-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/05/06/%E7%AE%97%E6%B3%95-%E9%80%89%E6%8B%A9%E6%8E%92%E5%BA%8F/" title="选择排序"><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="选择排序"/></a><div class="content"><a class="title" href="/2021/05/06/%E7%AE%97%E6%B3%95-%E9%80%89%E6%8B%A9%E6%8E%92%E5%BA%8F/" title="选择排序">选择排序</a><time datetime="2021-05-05T16:00:00.000Z" title="发表于 2021-05-06 00:00:00">2021-05-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/04/12/Java-%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3Java%E8%99%9A%E6%8B%9F%E6%9C%BA/" title="深入理解Java虚拟机"><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="深入理解Java虚拟机"/></a><div class="content"><a class="title" href="/2021/04/12/Java-%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3Java%E8%99%9A%E6%8B%9F%E6%9C%BA/" title="深入理解Java虚拟机">深入理解Java虚拟机</a><time datetime="2021-04-11T16:00:00.000Z" title="发表于 2021-04-12 00:00:00">2021-04-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/03/21/%E9%9D%A2%E8%AF%95-%E5%B9%B6%E5%8F%91%E3%80%81%E5%A4%9A%E7%BA%BF%E7%A8%8B/" title="面试题-并发编程"><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="面试题-并发编程"/></a><div class="content"><a class="title" href="/2021/03/21/%E9%9D%A2%E8%AF%95-%E5%B9%B6%E5%8F%91%E3%80%81%E5%A4%9A%E7%BA%BF%E7%A8%8B/" title="面试题-并发编程">面试题-并发编程</a><time datetime="2021-03-20T16:00:00.000Z" title="发表于 2021-03-21 00:00:00">2021-03-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/03/20/%E9%9D%A2%E8%AF%95-%E9%9B%86%E5%90%88/" title="面试题-集合框架"><img src="https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/BEF238F4E59CF4D91A694FE9C5DBC030.JPG" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="面试题-集合框架"/></a><div class="content"><a class="title" href="/2021/03/20/%E9%9D%A2%E8%AF%95-%E9%9B%86%E5%90%88/" title="面试题-集合框架">面试题-集合框架</a><time datetime="2021-03-19T16:00:00.000Z" title="发表于 2021-03-20 00:00:00">2021-03-20</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://fangchenyong.oss-cn-hangzhou.aliyuncs.com/img/20190723151525.png')"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2021 By 方陈勇</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">人生没有退路！</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><div class="js-pjax"></div><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-nest.min.js"></script></div></body></html>